<!DOCTYPE html>
<html lang="zh-CN">

    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title> <%= htmlWebpackPlugin.options.title %> </title>
        <script>
            var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
                CSS.supports('top: constant(a)'))
            document.write(
                '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
                (coverSupport ? ', viewport-fit=cover' : '') + '" />')
        </script>
        <script>
            window.onload = function() {
                // 重置根元素字体大小
                function resize() {
                    const rootEl = document.documentElement
                    let ww = window.innerWidth
                    if (ww > window.screen.width) {
                        window.requestAnimationFrame(resize)
                    } else {
                        if (ww > 420) {
                            ww = 420
                        }
                        rootEl.style.fontSize = ww * 16 / 375 + 'px'
                    }
                }
                resize()
                // 监听窗口大小发生变化
                window.addEventListener('resize', resize)
                // 监听页面显示
                window.addEventListener('pageshow', (e) => {
                    if (e.persisted) {
                        resize()
                    }
                })
            }
        </script>
        <link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
    </head>

    <body>
        <noscript>
            <strong>Please enable JavaScript to continue.</strong>
        </noscript>
        <div id="app"></div>
        <!-- built files will be auto injected -->
    </body>

</html>